<table>
  <tr>
    <th>产品名</th>
    <th>产品类别</th>
    <th>产品图片</th>
    <th>简要描述</th>
    <th>零售价格</th>
    <th>本站价格</th>
    <th>产品排序</th>
    <td colspan="5"><a href="#" id="clear_operate">隐藏编辑版块</a></td>
  </tr>
  <% for product in pro_items -%>
    <tr>
      <td><%=h product.name %></td>
      <td><%=product.procate.description %></td>
      <td><%=link_to image_tag("/images/proimages/"+(product.main_image && product.main_image.name ? product.main_image.name.gsub(".","_s."):"noimage.png"), :size=>"50x50"),
        product_pro_images_path(product) %></td>
      <td><%=h product.short_description %></td>
      <td><%=h product.price %></td>
      <td><%=h product.now_price %></td>
      <td><%=h product.pro_order %></td>
      <td><%=product.tuangou_pro ? "团购产品":link_to_remote('加入团购', :url=>new_tuangou_pro_path(:product_id=>product),:method=>:get,:update=>"operate") %></td>
      <td><%=link_to "编辑属性", edit_product_attribute_value_path(product),:popup => ['new_window_name', 'height=600,width=400,scrollbars=yes,resizable=yes,top=200,left=400']%></td>
      <td><%= link_to '编辑', edit_product_path(product)%></td>
       <td><%= link_to '拷贝',copy_product_path(product)%></td>
      <td><%= link_to_remote 'Destroy', :url=>product, :confirm => 'Are you sure?', :method => :delete,:update=>"pro_list",:with=>"'page=#{params[:page].blank? ? 1:params[:page]}'" %></td>
    </tr>
  <% end -%>
</table>

<%=will_paginate(pro_items,:params=>{:controller=>"products",:action=>"index",:procate_id=>"0"})%>
